<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>记忆测试</title>
<style>
.20pt {
	font-size: 20pt;
	color: #de3076
}
</style>
<script>N = (navigator.appName.indexOf("Netscape")!=-1); 
M = (navigator.appName.indexOf("Microsoft")!=-1); 
Vis = new Array(); 
Vis[0] = (M) ? "hidden" : "hide"; 
Vis[1] = (M) ? "visible" : "show"; 
function GetDiv(divId,divY,divX,divW,divH,bCol,visb,zInd) { 
bkCol=(bCol!="")?((N)?" bgColor="+bCol:";background:"+bCol):""; 
DivTyp = (M) ? "<DIV" : "<LAYER" 
if (M) { Styl=" ID="+divId+" style='position:absolute;top:"+divY+";left:"+divX+";width:"+divW+";height:"+divH+bkCol+";visibility:"+Vis[visb]+";z-index:"+zInd+"'>"; } 
if (N) { Styl=" ID="+divId+" top="+divY+" left="+divX+" width="+divW+" height="+divH+bkCol+" visibility="+Vis[visb]+" z-index="+zInd+">"; } 
document.writeln(DivTyp+Styl); 
} 
function EndDiv() { 
(M)? document.writeln("</DIV>") : document.writeln("</LAYER>"); 
} 
corr = new Array(); 
gnum = 0; 
score = 0; 
ind = 0; 
for (rows = 0; rows < 3; rows++) { 
for (cols = 0; cols < 5; cols++) { 
ind++; 
corr[ind] = 0; 
eval("GetDiv('d"+ind+"',"+rows*100+","+cols*100+",100,100,'',1,0)"); 
document.write("<img src=../image/entertainment/find/img-1-",ind,".png width=100 height=100 border=0>"); 
EndDiv(); 
eval("GetDiv('dvTop"+ind+"',"+rows*100+","+cols*100+",100,100,'',0,1)"); 
document.write("<img name = Pix",ind," src=../image/icon/ask.gif width=100 height=100 border=1 style='cursor:pointer;' onclick='TestMe(",ind,")'>"); 
EndDiv(); 
} 
} 
GetDiv('Control1',300,0,400,100,'#fff',1,0); 
document.write("<center><br>先仔细的看看这幅图,然后<a href='javascript:StartTest()'>开始测试</a>.</center>"); 
EndDiv(); 
GetDiv('Control2',300,0,400,100,'#fff',0,1); 
document.write("<center><br>这幅图对应在上面的哪个位置?=><br><br></center>"); 
EndDiv(); 
GetDiv('TestPix',300,400,100,100,'',1,1); 
document.write("<img src=../image/icon/unknown.gif name=Tester width=100 height=100"); 
EndDiv(); 
function StartTest() { 
if (M) { eval("document.all.Control2.style.visibility = 'visible'"); } 
if (N) { eval("document.layers.Control2.visibility = 'show'"); } 
for (x = 1; x < 16; x++) { 
if (corr[x] == 0) { 
if (M) { eval("document.all.dvTop"+x+".style.visibility = 'visible'"); } 
if (N) { eval("document.layers.dvTop"+x+".visibility = 'show'"); } 
} 
} 
PickRandom(); 
document.Tester.src = "../image/entertainment/find/img-1-"+picked+".png"; 
document.Tester.border=1;
} 
function PickRandom() { 
chk = 0 
while (chk == 0) { 
picked = 1+Math.floor(15*Math.random()) 
if (corr[picked] == 0) { chk = 1; break; } 
} 
} 
function TestMe(x) { 
gnum++; 
if (x == picked) { score++; corr[x] = 1; } 
if (M) { eval("document.all.dvTop"+x+".style.visibility = 'hidden'"); } 
if (N) { eval("document.layers.dvTop"+x+".visibility = 'hide'"); } 
if (gnum > 14) { 
alert("It's over! Score = "+score); 
for (x = 1; x < 16; x++) { corr[x] = 0; } 
if (score == 15) alert("And you win!"); 
gnum = 0; 
score = 0; 
window.close(); 
} 
setTimeout('StartTest()', 1000); 
} 
--> 
</script>
</head>
<body>
</body>
</html>
